#echo "部署218服务器"
set ssh_string tiannianbao@124.42.9.27
#set jar_name tnb-server_product.jar
spawn ssh $ssh_string
expect "~]$"
send "ps -ef |grep tnb-server_product.jar |grep -v \"grep\" | awk '{print \$2}' | xargs kill -9\r"
expect "~]$"
send "rm -rf tnb-server_product.jar.nohup.out\r"
expect "~]$"
send "nohup java -jar -Xmx2048M -Xms2048M tnb-server_product.jar > tnb-server_product.jar.nohug.out 2>&1 &\r"
expect eof
